app.controller("checkOutCtr",function($scope,$http){
	//点击删除，实现购物车删除的功能
	$scope.deleteProductsFromCarts = function(p){
		for (var i = 0; i < $scope.cartsArray.length; i++) {
			if($scope.cartsArray[i].product.id == p.product.id){
				$scope.cartsArray.splice(i,1);
			}
		};
		//重新计算数量和价格
		$scope.totalSumAndMoney();
	}
});